<template>
  <div id="areaWrapper">

  </div>
</template>

<script>
    export default {
      name: "srvlist",
      created() {
        console.log(this.$route.query.sysName)
        console.log(this.$route.query.srvName)
        this.getServicePathList(this.$route.query.sysName,this.$route.query.srvName)
      },
      data(){
        return{
          loading:false,
          servicepathList:[]
        }
      },
      methods:{
        getServicePathList(sysName,srvName){
          let url = `http://172.20.40.253/api/v1/query/service_path?sysName=${sysName}&srvName=${srvName}`
          this.$get(url,{}).then((res)=>{
            console.log("res",res)
            if (res.data.status=="success"){
              this.servicepathList = res.data.data[this.$route.query.srvName]
              this.servicepathList = this.servicepathList.map((item)=>{
                return {
                  path:item
                }
              })
              console.log(this.servicepathList)
            }
          })
        },
        goDetail(key){
          console.log(key)
          // this.$router.push({
          //   path:'/pathList',
          //   query:{
          //     sysName:key,
          //     service_info:key
          //   }
          // })
        }
      }
    }
</script>

<style scoped lang="scss">

  .cardArea{
    width: 98%;
    margin-top: 15px;
    border-radius: 3px;
    padding: 15px 15px 0 0;
    display: flex;
    flex-wrap: wrap;
    /* align-items: center;*/
  }

  .item {
    margin-left: 1%;
    width: 98%;
  }
  .items {
    padding: 10px 15px;
    margin: 10px 0;
    border: 1px solid #e8e8e8;
    border-radius: 5px;

  }
  #areaWrapper{
    width: 98%;
    min-height: 97vh;
    margin: 20px auto;
    overflow: auto;
    /*padding-top: 20px;*/
    /*border:1px solid;*/
    background-color: #fff;
    display: flex;
    justify-content: space-between;
      .left{
        height: 100%;
        border:1px solid #e8e8e8;
        border-radius: 4px;
        box-shadow: 3px 3px 3px 1px rgba(224, 200, 209, 0.2);
        overflow: auto;
      }
      .right{
        margin-left: 15px;
        height: 100%;
        border:1px solid #e8e8e8;
        border-radius: 4px;
        box-shadow: 3px 3px 3px 1px rgba(224, 200, 209, 0.2);
        overflow: auto;
        flex:1
      }
      .rightContent{
        display: flex;
        justify-content: center;
        align-items: center;
        width: 95%;
        margin: 0 auto;
      }
  }

  .sys{
    width: 40rem;
    border-radius: 5px;
    border: 1px solid #e8e8e8;
    padding: 10px;
    margin: 1rem 0 1rem  2.4rem;
    font-weight: bold;
    font-size: .9rem;
    background-color: #F5F5F5;
    box-shadow: 3px 3px 3px 1px rgba(224, 200, 209, 0.2);
  }
</style>
